package main

import (
	"github.com/nats-io/nats.go"
	"log"
)

func main() {
	url := "nats://192.168.4.119:4222"

	nc, err := nats.Connect(url)
	if err != nil {
		log.Fatal(err)
	}
	defer nc.Close()
	nc.Publish("foo", []byte("Hello World!"))
}
